package com.sq;

import cn.hutool.core.io.FileUtil;
import lombok.extern.slf4j.Slf4j;

import java.io.File;
import java.nio.charset.StandardCharsets;

/**
 * Hello world!
 */
@Slf4j
public class AppFile {
    public static void main(String[] args) throws Exception {
        String url = "http://172.20.1.100:8020/crswap/forecastService?wsdl";

        File file = new File("data.txt");
        log.info("文件[{}]",file.getAbsoluteFile());
        String readString = FileUtil.readString(file, StandardCharsets.UTF_8);
        log.info("读取到内容[{}]", readString);
        log.info("======开始调用webservice======");
        String response = ClientUtil.callWebSV(url, "greeting", readString);
        log.info("======结束调用webservice=返回结果[{}]=====", response);
    }
}
